package com.hxminer.hxwebs.enmus;

/**
 * Author YRG
 * Created by on 2018/5/8.
 * Describe
 */
public enum ResultEnum {

    UNKONW_ERROR(-1, "未知错误"),
    SUCCESS(0, "成功"),
    REGISTER_SUCCESS(0, "注册成功!"),
    ACOUNT_NOT(1, "登录失败!请检测账号或者密码"),
    USERNAME_OR_PASSWROD(2, "用户名或者密码为空!"),
    USER_EXISTS(3, "用户已经存在"),
    PHONE_OR_MAIL(5, "用户名或者密码为空!"),
    PHONE_OR_MAIL_REGISER(6, "该用户的手机号或者邮箱已注册"),
    PRODUCT_SAVE_SUCCESS(0, "商品提交结算成功"),
    PRODUCT_CART_SUCCESS(0, "购物车获取成功"),
    PRODUCT_CART_ERROR(1, "购物车是空的，请添加"),
    PRODUCT_TYPE(7, "商品不全"),
    ORDER_COMMIT_ERROR(1, "订单提交失败"),
    HISTORY_ORDER_ERROR(1, "历史订单获取失败"),
    ORDER_GET_ERROR(1, "订单获取失败，请联系服务"),
    CART_ADD_SUCCESS(0, "购物车添加成功"),
    CART_EXISTS(3, "该产品已添加到购物车了,可以去购买了!"),
    ORDER_COMMIT_SUCCESS(0, "订单提交成功"),
    ORDER_GENERATE_SUCCESS(0, "订单生成成功"),
    OBJECT_COMMIT_ERROR(1, "对象提交错误"),
    ;


    ResultEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    private Integer code;

    private String msg;

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
